package com.wang.interview.designmode.watcher;

/**
 * @author: wang
 * @date: 2021/8/2 11:07
 * @description:
 */
public class WeatherDataSubject extends Subject<Observers> {

    private float temperature;
    private float pressure;

    public float getTemperature() {
        return temperature;
    }

    public float getPressure() {
        return pressure;
    }

    public void setTemperature(float temperature) {
        this.temperature = temperature;
    }

    public void setPressure(float pressure) {
        this.pressure = pressure;
    }

    @Override
    void notifyT() {
        for (Observers observers : super.list) {
            observers.update(this.temperature, this.pressure);
        }
    }
}
